package com.lekang.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lekang.system.mapper.NursingHomeMapper;
import com.lekang.system.domain.NursingHome;
import com.lekang.system.service.INursingHomeService;

/**
 * 养老院Service业务层处理
 * 
 * @author zhihao
 * @date 2025-10-13
 */
@Service
public class NursingHomeServiceImpl implements INursingHomeService 
{
    @Autowired
    private NursingHomeMapper nursingHomeMapper;

    /**
     * 查询养老院
     * 
     * @param id 养老院主键
     * @return 养老院
     */
    @Override
    public NursingHome selectNursingHomeById(Long id)
    {
        return nursingHomeMapper.selectNursingHomeById(id);
    }

    /**
     * 查询养老院列表
     * 
     * @param nursingHome 养老院
     * @return 养老院
     */
    @Override
    public List<NursingHome> selectNursingHomeList(NursingHome nursingHome)
    {
        return nursingHomeMapper.selectNursingHomeList(nursingHome);
    }

    /**
     * 新增养老院
     * 
     * @param nursingHome 养老院
     * @return 结果
     */
    @Override
    public int insertNursingHome(NursingHome nursingHome)
    {
        return nursingHomeMapper.insertNursingHome(nursingHome);
    }

    /**
     * 修改养老院
     * 
     * @param nursingHome 养老院
     * @return 结果
     */
    @Override
    public int updateNursingHome(NursingHome nursingHome)
    {
        return nursingHomeMapper.updateNursingHome(nursingHome);
    }

    /**
     * 批量删除养老院
     * 
     * @param ids 需要删除的养老院主键
     * @return 结果
     */
    @Override
    public int deleteNursingHomeByIds(Long[] ids)
    {
        return nursingHomeMapper.deleteNursingHomeByIds(ids);
    }

    /**
     * 删除养老院信息
     * 
     * @param id 养老院主键
     * @return 结果
     */
    @Override
    public int deleteNursingHomeById(Long id)
    {
        return nursingHomeMapper.deleteNursingHomeById(id);
    }
}
